package com.ender.springboot.dao;

import com.ender.springboot.model.Student;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface StudentMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Student record);

    int insertSelective(Student record);

    Student selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Student record);

    int updateByPrimaryKey(Student record);

    /**
     * 使用pageHelper必须加@Param注解，否则不会分页
     * @param pageNum
     * @param pageSize
     * @return
     */
    List<Student> getStudentList(@Param("pageNum") int pageNum, @Param("pageSize") int pageSize);
}